/**
 * 信息推送-资产处置-获取信息列表
 * @param {number} data.pageNumber - 当前页
 * @param {number} data.pageSize - 每页条数
 * @param {string} data.title - 拍卖名称
 * @param {string} data.is_car_cate - 不包括机动车类型
 * @param {string} data.sell_type - 拍卖方式
 * @param {string} data.start_time - 创建时间
 * @param {string} data.end_time - 创建时间
 * @param {string} data.sell_start_time - 招标时间
 * @param {string} data.sell_end_time - 招标时间
 * @param {string} data.desc - 内容
 * @param {string} data.is_push - 是否推送
 * @param {string} data.msg_type - 信息分类
 * @param {string} data.crm_push_mans - 推送人
 */
function apiGetInfoList(data) {
  console.log("apiGetInfoList", data);
  return new Promise((resolve, reject) => {
    const res = {
      code: 200,
      data: [
        {
          id: 1,
          number_id: 100,
          title: "沧州地区处理使用中1200无拉伸制袋机23的机器",
          zone_names: "河北,沧州",
          start_sell_price: 20,
          start_unit: 1,
          promise_price: 2000,
          promise_unit: 1,
          power_man_name: "张三",
          is_push: 1,
          push_names: "张三",
          crm_push_time: "2020-01-01 00:00:00",
        },
        {
          id: 2,
          number_id: 200,
          title: "转让废铁破碎厂整体",
          zone_names: "河北,沧州",
          start_sell_price: 20,
          start_unit: 2,
          promise_price: 2000,
          promise_unit: 2,
          power_man_name: "张三",
          is_push: 1,
          push_names: "张三",
          crm_push_time: "2020-01-01 00:00:00",
        },
        {
          id: 3,
          number_id: 300,
          title: "金华地区处理轮胎14吨随车吊",
          zone_names: "河北,沧州",
          start_sell_price: 20,
          start_unit: 1,
          promise_price: 2000,
          promise_unit: 2,
          power_man_name: "张三",
          is_push: 1,
          push_names: "张三",
          crm_push_time: "2020-01-01 00:00:00",
        },
        {
          id: 4,
          number_id: 400,
          title: "沧州地区处理使用中1200无拉伸制袋机23的机器",
          zone_names: "河北,沧州",
          start_sell_price: 20,
          start_unit: 2,
          promise_price: 2000,
          promise_unit: 1,
          power_man_name: "张三",
          is_push: 1,
          push_names: "张三",
          crm_push_time: "2020-01-01 00:00:00",
        },
        {
          id: 5,
          number_id: 500,
          title: "沧州地区处理使用中1200无拉伸制袋机23的机器",
          zone_names: "河北,沧州",
          start_sell_price: 20,
          start_unit: 1,
          promise_price: 2000,
          promise_unit: 1,
          power_man_name: "张三",
          is_push: 1,
          push_names: "张三",
          crm_push_time: "2020-01-01 00:00:00",
        },
        {
          id: 6,
          number_id: 600,
          title: "沧州地区处理使用中1200无拉伸制袋机23的机器",
          zone_names: "河北,沧州",
          start_sell_price: 20,
          start_unit: 1,
          promise_price: 2000,
          promise_unit: 1,
          power_man_name: "张三",
          is_push: 1,
          push_names: "张三",
          crm_push_time: "2020-01-01 00:00:00",
        },
        {
          id: 7,
          number_id: 700,
          title: "沧州地区处理使用中1200无拉伸制袋机23的机器",
          zone_names: "河北,沧州",
          start_sell_price: 20,
          start_unit: 1,
          promise_price: 2000,
          promise_unit: 1,
          power_man_name: "张三",
          is_push: 1,
          push_names: "张三",
          crm_push_time: "2020-01-01 00:00:00",
        },
        {
          id: 8,
          number_id: 800,
          title: "沧州地区处理使用中1200无拉伸制袋机23的机器",
          zone_names: "河北,沧州",
          start_sell_price: 20,
          start_unit: 1,
          promise_price: 2000,
          promise_unit: 1,
          power_man_name: "张三",
          is_push: 1,
          push_names: "张三",
          crm_push_time: "2020-01-01 00:00:00",
        },
        {
          id: 9,
          number_id: 900,
          title: "沧州地区处理使用中1200无拉伸制袋机23的机器",
          zone_names: "河北,沧州",
          start_sell_price: 20,
          start_unit: 1,
          promise_price: 2000,
          promise_unit: 1,
          power_man_name: "张三",
          is_push: 1,
          push_names: "张三",
          crm_push_time: "2020-01-01 00:00:00",
        },
        {
          id: 10,
          number_id: 1000,
          title: "沧州地区处理使用中1200无拉伸制袋机23的机器",
          zone_names: "河北,沧州",
          start_sell_price: 20,
          start_unit: 1,
          promise_price: 2000,
          promise_unit: 1,
          power_man_name: "张三",
          is_push: 1,
          push_names: "张三",
          crm_push_time: "2020-01-01 00:00:00",
        },
      ],
      total: 100,
    };
    const err = {
      code: 500,
      msg: "获取列表失败",
    };
    setTimeout(() => {
      resolve(res);
      // reject(err);
    }, 500);
  });
}
/**
 * 信息推送-资产处置-获取信息详情
 * @param {number} data.id - 信息id
 * @param {number} data.number_id - 信息id
 */
function apiGetInfoDetail(data) {
  console.log("apiGetInfoDetail", data);
  return new Promise((resolve, reject) => {
    // const res = {
    //   code: 200,
    //   data: {
    //     id: 1,
    //     number_id: 100,
    //     title: "沧州地区处理使用中1200无拉伸制袋机23的机器",
    //     public_time: "2020-01-01 00:00:00",
    //     sell_time: "2025-01-01 00:00:00",
    //     company_name: "xxxxxxxxxxxx公司",
    //     cate_names: "二手设备/包装设备",
    //     city_names: "河北/沧州",
    //     user_phone: "13800138000",
    //     desc: "沧州地区处理使用中1200无拉伸制袋机23的机器沧州地区处理使用中1200无拉伸制袋机23的机器沧州地区处理使用中1200无拉伸制袋机23的机器沧州地区处理使用中1200无拉伸制袋机23的机器沧州地区处理使用中1200无拉伸制袋机23的机器",
    //     msg_type: 1,
    //     is_push: 1,
    //     push_names: "张三",
    //     images: "",
    //     // "http://img5.feijiu.net/pic/deptwo/zichan/2024/12/19/image_69ebea1d-c1d2-4fcb-b673-d0edfc9f1552.jpg_feijiu|http://img5.feijiu.net/pic/deptwo/zichan/2024/12/19/image_50fa8b08-1812-4c19-ad72-dac7de9f2ec6.jpg_feijiu|http://img5.feijiu.net/pic/deptwo/zichan/2024/12/19/image_792f8f56-fe26-48c6-ad8a-0936b5ea3832.jpg_feijiu",
    //     video_url: "",
    //     // "https://recycleimg.feijiu.net/zft/feijiu_admin/images/1741826752783-2597.mp4",
    //   },
    // };
    const res = {
      code: 200,
      data: {
        id: 1,
        number_id: 100,
        title: "",
        public_time: "",
        sell_time: "",
        company_name: "",
        cate_names: "",
        city_names: "",
        user_phone: "",
        desc: "",
        msg_type: 1,
        is_push: 1,
        push_names: "",
        images: "",
        video_url: "",
      },
    };
    setTimeout(() => {
      resolve(res);
    }, 500);
  });
}
/**
 * 信息推送-资产处置-获取用户分组及未分组用户
 */
function apiGetUserGroups() {
  console.log("apiGetUserGroups");
  return new Promise((resolve, reject) => {
    const res = {
      code: 200,
      data: {
        groups: [
          {
            id: 1,
            name: "用户组1",
            users: [
              { id: 101, name: "用户1" },
              { id: 102, name: "用户2" },
              { id: 103, name: "用户3" },
              { id: 104, name: "用户4" },
              { id: 105, name: "用户5" },
              { id: 106, name: "用户6" },
              { id: 107, name: "用户77777777777777777777" },
              { id: 108, name: "用户8" },
              { id: 109, name: "用户9" },
              { id: 110, name: "用户10" },
              { id: 111, name: "用户11" },
              { id: 112, name: "用户12" },
              { id: 113, name: "用户13" },
            ],
          },
          {
            id: 2,
            name: "用户组2",
            users: [
              { id: 201, name: "用户1" },
              { id: 202, name: "用户2" },
              { id: 203, name: "用户333333333333333333" },
            ],
          },
          {
            id: 3,
            name: "用户组33333333333333333333333333333333333333333333333333333",
            users: [
              { id: 301, name: "用户1" },
              { id: 302, name: "用户2" },
              { id: 303, name: "用户3" },
            ],
          },
          {
            id: 4,
            name: "用户组4",
            users: [
              { id: 401, name: "用户1" },
              { id: 402, name: "用户2" },
              { id: 403, name: "用户3" },
            ],
          },
          {
            id: 5,
            name: "用户组5",
            users: [
              { id: 501, name: "用户1" },
              { id: 502, name: "用户2" },
              { id: 503, name: "用户3" },
              { id: 504, name: "用户4" },
              { id: 505, name: "用户5" },
              { id: 506, name: "用户6" },
              { id: 507, name: "用户7" },
            ],
          },
        ],
        users: [
          // { id: 601, name: "用户1111111" },
          // { id: 602, name: "用户2" },
          // { id: 603, name: "用户3" },
          // { id: 604, name: "用户4" },
          // { id: 605, name: "用户5" },
          // { id: 606, name: "用户6" },
          // { id: 607, name: "用户7" },
        ],
      },
    };
    setTimeout(() => {
      resolve(res);
    });
  });
}
/**
 * 获取分类列表
 */
function apiGetCateList() {
  console.log("apiGetCateList");
  return new Promise((resolve, reject) => {
    const res = {
      code: 200,
      data: [
        {
          num_id: 1,
          name: "分类1",
          children: [
            {
              num_id: 11,
              name: "分类1-1",
            },
            {
              num_id: 12,
              name: "分类1-2",
            },
          ],
        },
        {
          num_id: 2,
          name: "分类2",
          children: [
            {
              num_id: 21,
              name: "分类2-1",
            },
            {
              num_id: 22,
              name: "分类2-2",
            },
          ],
        },
        {
          num_id: 3,
          name: "分类3",
          children: [],
        },
        {
          num_id: 4,
          name: "分类4",
          children: [],
        },
      ],
    };
    setTimeout(() => {
      resolve(res);
    }, 500);
  });
}
/**
 * 获取区域列表
 */
function apiGetZoneList() {
  console.log("apiGetZoneList");
  return new Promise((resolve, reject) => {
    const res = {
      code: 200,
      data: [
        {
          code: 1,
          name: "区域1",
          children: [
            {
              code: 11,
              name: "区域1-1",
            },
            {
              code: 12,
              name: "区域1-2",
            },
          ],
        },
        {
          code: 2,
          name: "区域2",
          children: [
            {
              code: 21,
              name: "区域2-1",
            },
          ],
        },
        {
          code: 3,
          name: "区域3",
        },
        {
          code: 4,
          name: "区域4",
        },
      ],
    };
    setTimeout(() => {
      resolve(res);
    }, 500);
  });
}
/**
 * 信息推送-资产处置-推送
 * @param {number} data.ids - 信息id
 * @param {number} data.number_ids - 信息number_id
 * @param {number} data.groups - 选中的组
 * @param {number} data.groups.users - 选中组里的用户
 * @param {number} data.users - 选中的未分组用户
 * @param {number} data.channels - 推送渠道
 */
function apiPushInfo(data) {
  console.log("apiPushInfo", data);
  return new Promise((resolve, reject) => {
    const res = {
      code: 200,
    };
    setTimeout(() => {
      resolve(res);
    });
  });
}
/*
 * 信息推送-获取小程序链接
 * @param {number} data.id - 信息id
 * @param {number} data.number_id - 信息number_id
 */
function apiGetMiniProgramUrl(data) {
  console.log("apiGetMiniProgramUrl", data);
  return new Promise((resolve, reject) => {
    const res = {
      code: 200,
      data: {
        url: "http://xxx.xxx.xxx",
      },
    };
    setTimeout(() => {
      resolve(res);
    }, 500);
  });
}
